import request from '@/utils/request'
// 新增部门
const addDpt = data =>
  request({
    url: '/company/department',
    method: 'post',
    data
  })
// 查询企业的部门列表
const getDptList = () =>
  request({
    url: '/company/department'
  })
// 根据id修改部门详情
const changeDpt = id =>
  request({
    url: `/company/department/${id}`,
    method: 'put'
  })
// 根据id删除部门
const delDpt = id =>
  request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
// 根据id查询部门详情
const getDpt = id =>
  request({
    url: `/company/department/${id}`
  })
export { addDpt, getDptList, changeDpt, delDpt, getDpt }
